home *** CD-ROM | disk | FTP | other *** search
- Path: blv-pm3-ip24.halcyon.com!user
- From: hawkfish@punchdeck.com (Richard Wesley)
- Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.edu,comp.lang.c,comp.lang.c++,comp.lang.modula2,comp.lang.modula3
- Subject: Re: Hungarian notation
- Date: Mon, 08 Jan 1996 09:04:58 -0800
- Organization: Punch Deck Consulting
- Message-ID: <hawkfish-0801960904580001@blv-pm3-ip24.halcyon.com>
- References: <30C40F77.53B5@swsbbs.com> <30EF0415.6FE1@tus.ssi1.com> <1996Jan7.045815.8676@ohstpy> <4cpb00$nqk@news.xmission.com>
- NNTP-Posting-Host: blv-pm3-ip24.halcyon.com
- X-Newsreader: Yet Another NewsWatcher 2.1.2
-
- In article <4cpb00$nqk@news.xmission.com>, tknarr@xmission.com ( Todd
- Knarr ) wrote:
- >I prefer prefixes that ignore type entirely and concentrate on purpose.
- >To me, the idea that a variable is a counter is more important than exactly
- >what size of counter it is. If I'm calculating an integral value, I like to
- >know if it's intended as an index into an array ( character strings come
- >to mind here ) as opposed to, say, the total hundredths of gallons of fuel
- >pumped from a pump.
-
- I've found it useful to use typedefs for all sorts of things like this.
- Looping through a FooArray with a FooIndex is much more robust than using
- a long or something.
-
- >Pointers vs. arrays is about the only useful low-level
- >concept where HN works well, because in C++ you use them in very much the
- >same way but there are some critical semantic differences that sometimes
- >come up and bite you.
-
- This is reasonable for C, but these days I find myself using auto_ptr and
- my own auto_array templates to deal with this problem. On the other hand,
- it could still be useful inside a class that used an array to represent
- something (e.g. a string).
-
-
- - rmgw
-
- http://www.punchdeck.com/hawkfish/PunchDeck.html
-
- ----------------------------------------------------------------------------
- Richard Wesley | "Wind that frog!"
- hawkfish@punchdeck.com | - Tom Hanks ("Toy Story")
- ----------------------------------------------------------------------------
-